<script src="@/js/wenhua/bashen.js"></script>

<template>

  <div class="bashen">
    <div class="margins">

      <!-- 面包屑导航 -->
      <el-affix :offset="80">
        <div class="navigation">
          <Breadcrumb separator=">">
            <BreadcrumbItem to="/">
              <Icon type="ios-home" />
              首页
            </BreadcrumbItem>
            <BreadcrumbItem to="/wenhua">
              <Icon type="logo-buffer" />
              文化
            </BreadcrumbItem>
            <BreadcrumbItem>
              <Icon type="md-pin" />
              八神
            </BreadcrumbItem>
          </Breadcrumb>
        </div>

        <!-- 猜你想看 -->
        <div class="prediction">
          猜你想看：
          <router-link to="/wenhua/bamen">
            八门
            <Icon type="ios-open-outline" />
          </router-link>
        </div>

        <!-- 分割线 -->
        <div class="divider">
          <el-divider />
        </div>
      </el-affix>

      <!-- 数据 -->
      <div class="data">
        <el-row :gutter="10">
          <el-col :span="3">
            <el-affix :offset="125">
              <el-card shadow="never" class="left">
                <div>
                  <button class="introduce-button" @click="pageTable = 0">
                    基础介绍
                    <span v-show="pageTable === 0">
                      <Icon type="ios-arrow-dropright-circle" />
                    </span>
                  </button>
                </div>
                <br />
                <div>
                  <button class="details-button" @click="pageTable = 1">
                    详细解读
                    <span v-show="pageTable === 1">
                      <Icon type="ios-arrow-dropright-circle" />
                    </span>
                  </button>
                </div>
              </el-card>
            </el-affix>
          </el-col>
          <el-col :span="21">
            <el-card shadow="always" class="right">
              <div v-show="pageTable === 0" class="content">
                <div>
                  <el-tag size="large" round type="info" effect="dark">
                    <span>何谓八神？</span>
                  </el-tag>
                </div>
                <div>
                  <div>
                    八神即神助，是古人在天人感应中发现的与九宫八卦具有相对应性质的八种神秘的自然力量，虽然虚无缥缈，但却在冥冥中左右着人的运程。
                  </div>
                  <br />
                  <div>
                    即：<b><u>值符、螣蛇、太阴、六合、白虎、玄武、九地、九天</u></b>
                  </div>
                </div>
              </div>
              <div v-show="pageTable === 1" class="content">
                <div>
                  <el-input clearable maxlength="2" show-word-limit v-model="queryData" style="width: 300px"
                    placeholder="请输入八神名称（如：值符）">
                    <template #prefix>
                      <el-icon>
                        <Edit />
                      </el-icon>
                    </template>
                  </el-input>
                  <span>
                    &nbsp;
                    <Button icon="ios-search" @click="">搜索</Button>
                  </span>
                  <span class="page">
                    <el-pagination small background class="pageList" :pager-count="3" :page-sizes="[10, 30, 50, 70, 90]"
                      layout="total, sizes, prev, pager, next, jumper" :total="dataTotal" :current-page.sync="page"
                      :page-size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange">
                    </el-pagination>
                  </span>
                  <div class="divider">
                    <el-divider />
                  </div>
                </div>

                <div v-show="data && data.length !== 0">
                  <div v-for="item in data" :key="item" class="for">
                    <el-card shadow="hover">
                      <div class="name">【<b v-html="showDataMethod(item.name)"></b>】</div>
                      <div>
                        <b>含义： </b>
                        {{ item.meaning }}
                      </div>
                      <div>
                        <b>概念： </b>
                        {{ item.concept }}
                      </div>
                      <div>
                        <b>利弊： </b>
                        {{ item.losses }}
                      </div>
                      <br />
                      <div>
                        <b>万物类象：</b>
                        <div class="leixiang">
                          <div v-for="lx in item.leiXiang.length" :key="lx">
                            {{ item.leiXiang.split("#")[lx] }}
                          </div>
                        </div>
                      </div>
                      <div class="index">
                        {{ item.id }}
                      </div>
                    </el-card>
                  </div>
                </div>
                <div v-show="data.length === 0" class="null">
                  暂无数据
                </div>
              </div>
            </el-card>
          </el-col>
        </el-row>
      </div>

    </div>
  </div>

</template>

<style lang="less" scoped src="@/css/wenhua/bashen.scss"></style>
